import { message, notification } from 'antd';
import React from 'react';

const normal = (content: string) => {
	message.info({
		icon: <span></span>,
		content
	});
};

const notify = (content: string, callback?: () => void) => {
	notification.open({
		message: '',
		description: content,
		top: 70,
		className: 'widget-message-notify',
		onClick: () => {
			callback && callback();
			console.log('Notification Clicked!');
		}
	});
};

const Message = {
	normal: normal,
	notify: notify,
	...message
};

export default Message;
